/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.datawander.codecompiler;

import java.io.File;
import java.io.FilenameFilter;

/**
 *
 * @author Marcin Stachniuk
 */
public class SufixFilenameFilter implements FilenameFilter {

    private String sufix;

    public SufixFilenameFilter(String sufix) {
        this.sufix = sufix;
    }

    public boolean accept(File dir, String name) {
        if(!name.endsWith(sufix)) {
            return false;
        } else {
            return true;
        }
    }

}
